﻿using Adaptive.Agrona;
using Adaptive.Agrona.Concurrent;
using Xunit;

namespace Unity.Debug.Tests
{
    public class ConsoleUnityStreamProducerTest
    {
        [Fact]
        public void MethodsTest()
        {
            ConsoleUnityStreamProducer testConsoleUnityStreamProducer = 
                new ConsoleUnityStreamProducer();

            testConsoleUnityStreamProducer.Connect(null);
            testConsoleUnityStreamProducer.Connect(null);
            testConsoleUnityStreamProducer.Dispose();

            IDirectBuffer testBuffer = new UnsafeBuffer(new byte[1024]);
            int testOffset = 0;
            int testLength = 0;
            testConsoleUnityStreamProducer.Produce(testBuffer, testOffset, testLength);
            testConsoleUnityStreamProducer.AddToBatching(testBuffer, testOffset, testLength);
            testConsoleUnityStreamProducer.CompleteBatching();
        }
    }
}